package no.ntnu.idi.deid.config;

import java.io.File;

public enum DataBases {
	ICD10(Constants.ICD10_TEXT_FILE,Constants.ICD10_DB_FILE),
	NCSP(Constants.NCSP_TEXT_FILE,Constants.NCSP_DB_FILE),
	ICPC(Constants.ICPC_TEXT_FILE,Constants.ICPC_DB_FILE),
	SNOMED(Constants.SNOMED_TEXT_FILE, Constants.SNOMED_DB_FILE),
	NCMP(Constants.NCMP_TEXT_FILE, Constants.NCMP_DB_FILE),
	NCRP(Constants.NCRP_TEXT_FILE, Constants.NCRP_DB_FILE),
	ORGNAME(Constants.ORGNAME_TEXT_FILE, Constants.ORGNAME_DB_FILE);
		
	private DataBases(File textFile, File databaseFile) {
		mDatabaseContainer = new DatabaseContainer(textFile, databaseFile);
	}
	
	private DataBases(String textFile, String databaseFile) {
		mDatabaseContainer = new DatabaseContainer(new File(textFile), new File(databaseFile));
	}
	
	DatabaseContainer mDatabaseContainer;
	
	public File getTextFile() {
		return mDatabaseContainer.getmTextFile();
	}
	
	public File getDataBaseFile() {
		return mDatabaseContainer.getmDatabaseFile();
	}

	
	private class DatabaseContainer {
		private File mTextFile;
		private File mDatabaseFile;
		
		public DatabaseContainer(File textFile, File databaseFile) {
			mTextFile = textFile;
			mDatabaseFile = databaseFile;
		}

		public File getmDatabaseFile() {
			return mDatabaseFile;
		}

		public File getmTextFile() {
			return mTextFile;
		}
	}

}
